-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] Fix webauth credential to allow nullable rpID
#15201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
RenderMichael
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be misremembering, but I think a credential doesn't work if the rpId is null.
I'm a little concerned about misleading users if we mark the field as nullable. In order to get rid of the null argument warning, maybe we can change FromDictionary from TryGetValue to a direct indexer.
|
Found this one: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn/#type-Credential Seems |
|
What if the |
RenderMichael
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per comments about rpId being optional, this change makes sense to me
RenderMichael
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! These changes offers nullability guidance to users without throwing any exceptions on the C# side
User description
Motivation and Context
Fixes issue, introduced in recent versions.
https://github.com/SeleniumHQ/seleniumhq.github.io/actions/runs/13062596341/job/36448769281
Types of changes
Checklist
PR Type
Bug fix
Description
Made
rpIdparameter nullable inCredentialclass.Updated constructors and methods to handle nullable
rpId.Adjusted exception documentation to reflect nullable
rpId.Changes walkthrough 📝
Credential.cs
Allow nullable `rpId` in `Credential` classdotnet/src/webdriver/VirtualAuth/Credential.cs
rpIdparameter to nullable in constructor.CreateNonResidentCredentialandCreateResidentCredentialmethods to accept nullable
rpId.rpIdparameter.